#include "defer.h"

Defer::Defer(deferfunc func)
    : m_func(func)
{

}

Defer::~Defer()
{
    if (m_func != nullptr)
        m_func();
}
